window.addEventListener('scroll', function() {
    var topmenuup = this.document.getElementById('topmenu1')
    var topmenudown = this.document.getElementById('topmenu2')

    if (window.pageYOffset > topmenuup.offsetHeight) {
        topmenudown.classList.add('topmenufixed')
    } else {
        topmenudown.classList.remove('topmenufixed')
    }
})